<#include "ftl/common.ftl">
<#assign baseLib="${base}/desform/lib">
<#assign baseJmForm="${baseLib}/jm-form">
<#assign baseElementUI="${baseLib}/element-ui">

<!DOCTYPE html>
<html lang="zh-Hans">

<head>
  <title></title>
  <meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<#-- 加载样式 -->
	<link rel="stylesheet" href="${baseElementUI}/elementUI.css?${CACHE_VERSION}">
	<link rel="stylesheet" href="${baseJmForm}/JmForm.css?${CACHE_VERSION}">
	<style>
	.el-dialog__footer {
		text-align: right;
	}

	.block.el-dialog__footer {
		padding-left: 0;
		padding-right: 0;
	}

	.block button {
		width: 100%;
	}
	</style>
</head>


<body style="background-color: transparent;">
	<div id="app" style="opacity: 0" :style="{opacity: '1'}">
		<#include "ftl/generate/template.ftl">
	</div>



</body>
<script src="${base}/unpkg/polyfill/7.2.5/polyfill.js"></script>
<script src="${base}/unpkg/vue@2.6.10/vue.js?${CACHE_VERSION}"></script>
<script src="${base}/unpkg/jquery@3.4.1/jquery.js?${CACHE_VERSION}"></script>
<script src="${baseElementUI}/ElementUI.umd.js?${CACHE_VERSION}"></script>
<script src="${base}/unpkg/vue-ls@3.2.1/vue-ls.min.js?${CACHE_VERSION}"></script>
<!-- 引入组件库 -->
<script src="${baseJmForm}/JmForm.umd.js?${CACHE_VERSION}"></script>
<!-- 需要在设计器中预览代码需要引入ace.js库 -->
<script src="${base}/unpkg/jm-form@1.1.23/ace.js?${CACHE_VERSION}"></script>
<script src="${base}/desform/utils.js?${CACHE_VERSION}"></script>
<script src="${base}/lib/qrcode.min.js?${CACHE_VERSION}"></script>
<script>
		var store = JmForm.default.store
		var DeviceMixins = JmForm.default.mixins.DeviceMixins
		var constant = JmForm.default.constant

		// 从配置里读取主题颜色
		window['THEME_COLOR'] = '${themeColor}'
		// 获取token等参数
		var token = getQueryParams("token")
		var messageId = getQueryParams("messageId")

		// 是否在内部发送请求
		var innerRequest = getQueryParams("innerRequest")
		innerRequest = !(innerRequest === 'false')
		// 是否在内部展示对话框，如果此项为 true 则 innerRequest如论如何都为 true
		var innerDialog = getQueryParams("innerDialog")
		innerDialog = (innerDialog === 'true')
		innerRequest = innerDialog === true ? true : innerRequest

    //默认跳转模式（跳转成功页面）
    var skip = getQueryParams("skip")
    skip = !(skip === 'false')

		// 判断是否禁止滚动
		var disableScroll = getQueryParams("disableScroll")
		if (!!(disableScroll === 'true')) {
			document.body.style.overflow = 'hidden'
		}

		Vue.ls.set(constant.BASE_URL, '${baseURL}')
		Vue.ls.set(constant.ACCESS_TOKEN, token)

		var isExternal = false
    var ExternalMixins = {
      data: function () {
        return { isExternal: false, externalSavedList: [] }
      },
    }

</script>

	<#include "ftl/generate/script.ftl" >

</html>